import request from '@/utils/request'

const api_name = '/statistics/goods'
export default {
  getTmRepeat(searchObj,showNum) {
    return request({
      url: `${api_name}/getTmRepeat/${showNum}`,
      method: 'get',
      params: searchObj
    })
  },
  getCateTradeStats(searchObj) {
    return request({
      url: `${api_name}/getCateTradeStats`,
      method: 'get',
      params: searchObj
    })
  },
  getTmTradeStats(page,limit,searchObj) {
    return request({
      url: `${api_name}/getTmTradeStats/${page}/${limit}/`,
      method: 'get',
      params: searchObj
    })
  },
  getCategory1(curDate) {
    return request({
      url: `${api_name}/getCategory1/${curDate}`,
      method: 'get'
    })
  },
  getCategory2(curDate,category1) {
    return request({
      url: `${api_name}/getCategory2/${curDate}/${category1}`,
      method: 'get'
    })
  },
  getCategory3(curDate,category1,category2) {
    return request({
      url: `${api_name}/getCategory3/${curDate}/${category1}/${category2}`,
      method: 'get'
    })
  },
  getTmTopNData(curDate,category1,category2,category3) {
    return request({
      url: `${api_name}/getTmTopNData/${curDate}/${category1}/${category2}/${category3}`,
      method: 'get'
    })
  }
}
